翻訳と辞書
Words near each other
・ binaries
・ binary
・ binary coded decimal
・ binary compatibility standard
・ binary counter
・ binary data
・ binary exponential backoff
・ binary file
・ binary large object
・ binary package
binary search
・ binary synchronous transmission
・ binary tree
・ bind
・ bindery
・ binding handle
・ binding-time analysis
・ binhex
・ binhex 4.0
・ binprolog


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

binary search : FOLDOC
binary search
A search algorithm which repeatedly divides an ordered {search space} in half according to how the required (key) value compares with the middle element.
The following pseudo-C routine performs a binary search return the index of the element of vector "thing[first..last]" equal to "target":
if (target < thing[first] || target > thing[last])
return NOT_FOUND;
while (first < last)
{
mid = (first+last)/2; /* truncate to integer */
if (target == thing[mid])
return mid;
if (target < thing[mid])
last = mid-1;
else
first = mid+1;
}
if (target == thing[last])
return last;
return NOT_FOUND;

(2003-01-14)



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.